/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.member;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

import java.util.List;

/**
<p>Title:MemberTradeInfo</p>  
<p>Description: ��ѯ��ˮ</p>
 */
public class MemberTradeInfo extends MerchantBaseRequest{
	
	private String user_id;//*����ش� ���̻������ɹ����
	private String user_type;//*����ش� 1�������̻�2�����幤�̻�3����ҵ�̻�
	private String start_date;//*����ش� ��ѯ����ʼ����
	private String end_date;//*����ش� ��ѯ�Ľ�������
	private String page_num;//*����ش� ��1��ʼ
	private String page_size;//*����ش� ÿҳ�����������999
	
	private String url = "/member/tradeInfo";

	private String total_num;//[��Ӧ����] ��ѯ����ƥ�䵽��������
	private List<TransDetail> trans_detail;//[��Ӧ����] ÿһ����ˮ�ļ���

	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public MemberTradeInfo doRequest() throws Exception {
		Message<MemberTradeInfo> response = UMFUtil.get(createAPIContext(), this,MemberTradeInfo.class);
		MerchantBaseRequest baseResult = convertResult(response, MemberTradeInfo.class);
		if(baseResult == null)
			return null;
		return (MemberTradeInfo)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getUser_id() {
		return user_id;
	}

	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}

	public String getUser_type() {
		return user_type;
	}

	public void setUser_type(String user_type) {
		this.user_type = user_type;
	}

	public String getStart_date() {
		return start_date;
	}

	public void setStart_date(String start_date) {
		this.start_date = start_date;
	}

	public String getEnd_date() {
		return end_date;
	}

	public void setEnd_date(String end_date) {
		this.end_date = end_date;
	}

	public String getPage_num() {
		return page_num;
	}

	public void setPage_num(String page_num) {
		this.page_num = page_num;
	}

	public String getPage_size() {
		return page_size;
	}

	public void setPage_size(String page_size) {
		this.page_size = page_size;
	}

	public String getTotal_num() {
		return total_num;
	}

	public void setTotal_num(String total_num) {
		this.total_num = total_num;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("MemberTradeInfo [user_id=");
		builder.append(user_id);
		builder.append(", user_type=");
		builder.append(user_type);
		builder.append(", start_date=");
		builder.append(start_date);
		builder.append(", end_date=");
		builder.append(end_date);
		builder.append(", page_num=");
		builder.append(page_num);
		builder.append(", page_size=");
		builder.append(page_size);
		builder.append(", url=");
		builder.append(url);
		builder.append(", total_num=");
		builder.append(total_num);
		builder.append(", trans_detail=");
		builder.append(trans_detail);
		builder.append(", version=");
		builder.append(version);
		builder.append(", mer_id=");
		builder.append(mer_id);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}

	public List<TransDetail> getTrans_detail() {
		return trans_detail;
	}

	public void setTrans_detail(List<TransDetail> trans_detail) {
		this.trans_detail = trans_detail;
	}

}
